home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 326-350 / disk_334 / fbm / readme < prev    next >
Text File  |  1992-05-06  |  6KB  |  160 lines

  1. This directory contains the Beta test release (version 0.9) of the
  2. Fuzzy Pixmap Manipulation (FBM) library of programs.  This collection
  3. (in combination with Jef Poskanzer's PBM collection) provides a
  4. complete package for manipulating and converting color and black and
  5. whites images, including 24bit RGB, 8bit mapped color, 8bit grayscale,
  6. and 1bit bitmapped images.
  7.  
  8. Compilation
  9.  
  10.     Unpack all files in one directory.  Edit Makefile and put in
  11.     appropriate values for 
  12.  
  13. File Formats
  14.  
  15.     FBM   (-F)    FBM file with 256 byte header (with title & credits)
  16.     Sun   (-S)    Sun rasterfile with 32 byte header
  17.     PBM   (-P)    Poskanzer format for 1bit files
  18.     GIF   (-G)    CompuServe GIF format
  19.     IFF   (-I)    Amiga IFF files (except HAM mode files)
  20.     PCX   (-Z)    PC PaintBrush format for IBM
  21.     Face  (-B)    Bennet Yee's 1bit files, used at CMU
  22.  
  23.     All programs (except fbinfo) can read any of the formats, and use
  24.     the magic number to decide the file type.  If the input is not a
  25.     pipe and is compressed using the net standard 'compress' program,
  26.     the file will be uncompressed as it is read.  Note however that 
  27.     the operation to be performed must make sense; that is you cannot
  28.     halftone a color image, quantize a grayscale image, or resize a
  29.     1bit file.
  30.  
  31. Files and Programs:
  32.  
  33.     README        This file
  34.     README.lib    Lists the subroutines in libfbm.a
  35.     Makefile    Make utility configuration file
  36.     fbm.1        General manual entry
  37.     *.1        Individual manual entries
  38.     fbm.h        Defines FBM data structures
  39.  
  40.     clr2gray  Convert color to grayscale
  41.     fbcat      Copy image (used for format conversion)
  42.     fbclean      Flip isolated pixels (clean image)
  43.     fbedge      Compute derivative image (edge detection)
  44.     fbext      Extract region, resize, change aspect ratio
  45.     fbhalf      Halftone grayscale image (Blue noise, Floyd-Steinberg, etc)
  46.     fbhist      Compute histogram
  47.     fbinfo      Dump image header
  48.     fbm2pod      Convert grayscale image to Diablo graphics (!)
  49.     fbmask      Set region to gray value
  50.     fbnorm      Normalize image intensity / increase contrast
  51.     fbps      Convert to PostScript
  52.     fbquant      Color quantization (24 bit to 8..256 colors) Mod. Heckbert
  53.     fbrot      Rotate 90, 180, or 270 degrees
  54.     fbsample  Sample a 1bit file to produce an 8bit file
  55.     fbsharp      Sharpen (edge enhancement) by digital Laplacian
  56.     gray2clr  Add a "gray" colormap to a grayscale image
  57.     idiff      (and udiff) convert raw byte stream into byte difference
  58.     pbm2ps      Convert PBM file to PostScript
  59.     pbmtitle  Add a title to a PBM file
  60.     raw2fbm      Convert raw file to FBM format (eg: Amiga Digiview files)
  61.  
  62.  
  63.  
  64. Extensions
  65.  
  66.     Several file extension conventions are used, but none are enforced
  67.  
  68.     .Z        Compressed file, appended to other extensions
  69.  
  70.     .fbm        Standard extension for FBM format files
  71.     .cbm        Sometimes used to mean a 24bit color FBM file
  72.  
  73.     .ip        8bit grayscale Amiga file (with 1.2 aspect ratio)
  74.     .cp        24bit color Amiga file (with 1.2 aspect ratio)
  75.  
  76.     .1bit        Sun 1bit rastefile
  77.     .clr        Sometimes used to mean a 8bit mapped color Sun file
  78.  
  79.     .bm        Bennet Yee's "Face" format (1bit)
  80.     .pbm        Poskanzer 1bit format
  81.     .gif        Compuserve GIF format
  82.     .pcx        ZSoft's PCPaintbrush format
  83.  
  84. Example Unix pipelines to view files:
  85.  
  86.     Starting with an 8 bit raw Amiga grayscale file, foo.ip, first
  87.     create an FBM format file with a title and credit, then process
  88.     that file for viewing on a Sun screen by normalizing, rotating,
  89.     resizing, sharpening, and halftoning.
  90.  
  91.     % raw2fbm -d1 -a1.2 -w640 -h400 \
  92.       -t'Random Title' -c'Random Credit' < foo.ip > foo.fbm
  93.  
  94.     % fbinfo foo.fbm
  95.     foo.fbm            "Random Title"
  96.             [ Random Credit ]
  97.             [640x400x8]    8 physbits  1.2 aspect ratio
  98.             row length 640, plane length 256000, colormap length 0
  99.  
  100.  
  101.     % fbnorm < foo.fbm | \            (normalize)
  102.       fbrot | \                (rotate 90 deg clockwise)
  103.       fbext -a1 -W900 -H768 | \        (resize & make aspect ratio 1)
  104.       fbhalf -s10 -S > foo.1bit        (sharpen, halftone, write Sun)
  105.  
  106.  
  107.  
  108.     Starting with a 24 bit color Amiga file, bar.cp, first create an
  109.     FBM format file with title and credit, then render that file for
  110.     viewing on a Sun by normalizing, rotating, sharpening, and
  111.     quantizing.
  112.  
  113.     % raw2fbm -d3 -a1.2 -w640 -h400 \
  114.       -t'Random Color Title' -c'Random Color Credit' < bar.cp > bar.cbm
  115.  
  116.     % fbinfo bar.cbm
  117.     bar.cbm            "Random Color Title"
  118.             [ Random Color Credit ]
  119.             [3x640x400x8]    8 physbits  1.2 aspect ratio
  120.             row length 640, plane length 256000, colormap length 0
  121.  
  122.  
  123.     % fbnorm < bar.cbm | \            (normalize)
  124.       fbrot | \                (rotate 90 deg clockwise)
  125.       fbext -a1 -W900 -H768 | \        (resize & make aspect ratio 1)
  126.       fbsharp 3.0 | \            (sharpen it)
  127.       fbquant -S > bar.clr            (quantize and write Sun)
  128.  
  129.     (Note that sharpening is an integral option to the halftoning
  130.      program using the -s option, but that color images must currently
  131.      be sharpened using a separate program.  Note also that more
  132.      sharpening is used on black and white images than on color images).
  133.  
  134. Notes on the 'fbext' program
  135.  
  136.     Usage:    fbext [ -w<width> -h<height> -W<maxwdith> -H<maxheight>
  137.                 -s<size> -a<aspect> -t'title' -c'credits' ]
  138.              [ x y [ width height ] ]
  139.         < foo.fbm > bar.fbm
  140.  
  141.     fbext (bitmap extract) is a very useful anmd multipurpose program.
  142.     Its basic operation is to copy a rectangular portion of one image
  143.     (color or black and white) to a second image, possibly changing
  144.     either the width or height or both.  It can also change the title
  145.     or credits fields of the image.  Because it is so versatile, there
  146.     are a host of options:
  147.  
  148.     -w<num>  or  -h<num>    Force width and/or height to a certain size
  149.     -W<num>  or  -H<num>    Limit width and height to a certain size
  150.     -a<num>            Force the output to have a given aspect ratio
  151.     -s<num>            Scale image to have no more than a given
  152.                 number of pixels.
  153.     <x0> <y0> <width> <height>  select a rectangular region of the image
  154.                 to extract.  The default is the entire image.
  155.  
  156.     Note that the output size limits are cumulative.  Thus if you set a
  157.     maximum width, height, and number of pixels, the image will be the
  158.     smallest of the three limits.
  159.  
  160.